﻿@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
    {
    @Html.AntiForgeryToken()

    <ul class="nav navbar-nav navbar-right">
        <li>
            <a href="@Url.Action("Manage", "Account")" title="Felhasználói fiók kezelése"><span class="glyphicon glyphicon-user"></span> Üdv, @User.Identity.GetUserName() !</a>
        </li>
        <li>
            <a href="javascript:document.getElementById('logoutForm').submit()"><span class="glyphicon glyphicon-log-out"></span> Kijelentkezés</a>
        </li>
    </ul>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("Regisztráció", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li><a href="@Url.Action("Login", "Account")" id="loginLink" data-remote="@Url.Action("Login", "Account", new {partial=true})" data-toggle="modal" data-target="#loginModal"><span class="glyphicon glyphicon-log-in"></span> Bejelentkezés</a></li>
    </ul>
}
